package com.xqb.modules.service.impl;

import com.xqb.modules.domain.po.LesSubjectCategory;
import com.xqb.modules.mapper.LesSubjectCategoryMapper;
import com.xqb.modules.service.ILesSubjectCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 课程分类关系Service业务层处理
 * 
 * @author xqb
 * @date 2024-10-14
 */
@Service
public class LesSubjectCategoryServiceImpl implements ILesSubjectCategoryService 
{
    @Autowired
    private LesSubjectCategoryMapper lesSubjectCategoryMapper;

    /**
     * 查询课程分类关系
     * 
     * @param id 课程分类关系主键
     * @return 课程分类关系
     */
    @Override
    public LesSubjectCategory selectLesSubjectCategoryById(Long id)
    {
        return lesSubjectCategoryMapper.selectLesSubjectCategoryById(id);
    }

    /**
     * 查询课程分类关系列表
     * 
     * @param lesSubjectCategory 课程分类关系
     * @return 课程分类关系
     */
    @Override
    public List<LesSubjectCategory> selectLesSubjectCategoryList(LesSubjectCategory lesSubjectCategory)
    {
        return lesSubjectCategoryMapper.selectLesSubjectCategoryList(lesSubjectCategory);
    }

    /**
     * 新增课程分类关系
     * 
     * @param lesSubjectCategory 课程分类关系
     * @return 结果
     */
    @Override
    public int insertLesSubjectCategory(LesSubjectCategory lesSubjectCategory)
    {
        return lesSubjectCategoryMapper.insertLesSubjectCategory(lesSubjectCategory);
    }

    /**
     * 修改课程分类关系
     * 
     * @param lesSubjectCategory 课程分类关系
     * @return 结果
     */
    @Override
    public int updateLesSubjectCategory(LesSubjectCategory lesSubjectCategory)
    {
        return lesSubjectCategoryMapper.updateLesSubjectCategory(lesSubjectCategory);
    }

    /**
     * 批量删除课程分类关系
     * 
     * @param ids 需要删除的课程分类关系主键
     * @return 结果
     */
    @Override
    public int deleteLesSubjectCategoryByIds(Long[] ids)
    {
        return lesSubjectCategoryMapper.deleteLesSubjectCategoryByIds(ids);
    }

    /**
     * 删除课程分类关系信息
     * 
     * @param id 课程分类关系主键
     * @return 结果
     */
    @Override
    public int deleteLesSubjectCategoryById(Long id)
    {
        return lesSubjectCategoryMapper.deleteLesSubjectCategoryById(id);
    }
}
